package com.example.trafficsystem.controller;

import com.example.trafficsystem.entity.Organization;
import com.example.trafficsystem.repository.OrganizationRe;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/organization")
@CrossOrigin
public class OrganizationController {
    @Autowired
    private OrganizationRe organizationRe;
    @GetMapping
    public List<Organization> findAll(){return organizationRe.findAll();}

}
